$('[name="login"]').click(function(){
    const xhr = myPromiseJQueryAjax('../server/goods_login.php','post',{userName:$('[name="name"]').val(),userPwd:$('[name="pwd"]').val()},'json');
    xhr.then(function(res){
        if(res.result === 1){
            mySetCookie( 'login' , 1 , 7*24*60*60, '/');
            if(window.confirm('您登录成功,点击确定跳转来时候的页面')){
              window.location.href = `${window.location.search.substr(5)}`;
            }
          }else if(res.result === 0){
            window.alert('您的账号密码有误,请您检查后,重新登录');
          }

    })
});